/*
 * @Author: Bennent_G
 * @Date: 2025-01-14 15:01:07
 * @LastEditTime: 2025-01-17 11:18:16
 * @Description:
 */
import http from "@/utils/http";
import type { ApiResponse } from '@/apis/type';

export const fetchLogin = <T>(params: any):Promise<ApiResponse<T>> => {
	return http({
		url: "/api/login",
		method: "POST",
		data: params
	});
};

// 用户列表
export const fetchUsers = <T>(params: any):Promise<ApiResponse<T>> => {
	return http({
		url: "/api/users",
		method: "GET",
		data: params
	});
};

export const fetchRoles = <T>(params: any):Promise<ApiResponse<T>> => {
	return http({
		url: "/api/roles",
		method: "GET",
		data: params
	});
};
